<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>AJAX Tester</title>
    <script type="text/javascript" src="js/jquery.js"></script>


    <script type="text/javascript">
        $(function () {
            // jsonp形式的请求
            $.ajax({
                url: "http://www.b.com/user_info?callback=?",
                data: {id: 1},
                dataType: "jsonp"
            }).done(showResult);
        });

        function showResult(ret) {
            console.log(ret);
            $("#container").html(ret.name);
        }
    </script>

</head>
<body>
My name is:
<span style="font-weight:bold;" id="container"></span>

<script type="text/javascript">

</script>

</body>
</html>